package com.example.udpDemo.socket.design.clone;

import lombok.extern.slf4j.Slf4j;

/**
 * @author wangdachuan
 * @version 1.0
 * @date 2023/4/2 01:06
 **/
@Slf4j
public class CloneTest {

    public static void main(String[] args) throws CloneNotSupportedException {
        DeviceEntity deviceEntity = new DeviceEntity("设备一");
        DeviceEntity cloneEntity = (DeviceEntity) deviceEntity.clone();
        log.info(deviceEntity.getName());
        log.info(cloneEntity.getName());
    }

}
